package com.ys.entity.mall;

import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TM_Gift", catalog="Id")
public class TmGift extends BaseEntity<TmGift> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="UserId", nameJava="userId", typeDataBase="varchar")
	private String userId;
	@YsField(nameDataBase="Code", nameJava="code", typeDataBase="varchar")
	private String code;
	@YsField(nameDataBase="GoodsId", nameJava="goodsId", typeDataBase="bigint")
	private Long goodsId;
	@YsField(nameDataBase="GoodsCode", nameJava="goodsCode", typeDataBase="varchar")
	private String goodsCode;
	@YsField(nameDataBase="GoodsImg", nameJava="goodsImg", typeDataBase="varchar")
	private String goodsImg;
	@YsField(nameDataBase="GoodsName", nameJava="goodsName", typeDataBase="varchar")
	private String goodsName;
	@YsField(nameDataBase="SourceType", nameJava="sourceType", typeDataBase="int")
	private Integer sourceType;
	@YsField(nameDataBase="SourceId", nameJava="sourceId", typeDataBase="bigint")
	private Long sourceId;
	@YsField(nameDataBase="InvalidTime", nameJava="invalidTime", typeDataBase="datetime")
	private Date invalidTime;
	@YsField(nameDataBase="State", nameJava="state", typeDataBase="tinyint")
	private Integer state;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TmGift setId(Long id) {
		this.id = id;
		return this;
	}
	public String getUserId() {
		return userId;
	}
	public TmGift setUserId(String userId) {
		this.userId = userId;
		return this;
	}
	public String getCode() {
		return code;
	}
	public TmGift setCode(String code) {
		this.code = code;
		return this;
	}
	public Long getGoodsId() {
		return goodsId;
	}
	public TmGift setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
		return this;
	}
	public String getGoodsCode() {
		return goodsCode;
	}
	public TmGift setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
		return this;
	}
	public String getGoodsImg() {
		return goodsImg;
	}
	public TmGift setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
		return this;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public TmGift setGoodsName(String goodsName) {
		this.goodsName = goodsName;
		return this;
	}
	public Integer getSourceType() {
		return sourceType;
	}
	public TmGift setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
		return this;
	}
	public Long getSourceId() {
		return sourceId;
	}
	public TmGift setSourceId(Long sourceId) {
		this.sourceId = sourceId;
		return this;
	}
	public Date getInvalidTime() {
		return invalidTime;
	}
	public TmGift setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
		return this;
	}
	public Integer getState() {
		return state;
	}
	public TmGift setState(Integer state) {
		this.state = state;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TmGift setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TmGift setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TmGift setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TmGift tmGift(
		String userId,
		String code,
		Long goodsId,
		String goodsCode,
		String goodsImg,
		String goodsName,
		Integer sourceType,
		Long sourceId,
		Date invalidTime,
		Integer state,
		Integer status
			) {
		TmGift entity = new TmGift();
		entity.setUserId(userId);
		entity.setCode(code);
		entity.setGoodsId(goodsId);
		entity.setGoodsCode(goodsCode);
		entity.setGoodsImg(goodsImg);
		entity.setGoodsName(goodsName);
		entity.setSourceType(sourceType);
		entity.setSourceId(sourceId);
		entity.setInvalidTime(invalidTime);
		entity.setState(state);
		entity.setStatus(status);
		return entity;
	}
}